package com.example.demo.activity;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;

import androidx.appcompat.app.AppCompatActivity;

import com.example.demo.R;

public class SingleTaskActivity extends AppCompatActivity implements View.OnClickListener {

    /**
     * 跳转SingleInstance
     */
    private Button btn_tz1;
    /**
     * 跳转singleTask
     */
    private Button btn_tz2;
    /**
     * 跳转singleTop
     */
    private Button btn_tz3;
    /**
     * 跳转standard
     */
    private Button btn_tz4;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_single_task);
        initView();
    }

    private void initView() {
        btn_tz1 = (Button) findViewById(R.id.btn_tz1);
        btn_tz1.setOnClickListener(this);
        btn_tz2 = (Button) findViewById(R.id.btn_tz2);
        btn_tz2.setOnClickListener(this);
        btn_tz3 = (Button) findViewById(R.id.btn_tz3);
        btn_tz3.setOnClickListener(this);
        btn_tz4 = (Button) findViewById(R.id.btn_tz4);
        btn_tz4.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            default:
                break;
            case R.id.btn_tz1:
                startActivity(new Intent(this, SingleInstanceActivity.class));
                Log.i("lunchMode", "跳转记录：" + getClass().getSimpleName() + "----->SingleInstanceActivity");
                break;
            case R.id.btn_tz2:
                startActivity(new Intent(this, SingleTaskActivity.class));
                Log.i("lunchMode", "跳转记录：" + getClass().getSimpleName() + "----->SingleTaskActivity");
                break;
            case R.id.btn_tz3:
                startActivity(new Intent(this, SingleTopActivity.class));
                Log.i("lunchMode", "跳转记录：" + getClass().getSimpleName() + "----->SingleTopActivity");
                break;
            case R.id.btn_tz4:
                startActivity(new Intent(this, StandardActivity.class));
                Log.i("lunchMode", "跳转记录：" + getClass().getSimpleName() + "----->StandardActivity");
                break;
        }
    }
}